import Vue from 'vue'
import Router from 'vue-router'
import Home from './views/Home.vue'

Vue.use(Router)

export default new Router({
  mode: 'history',
  base: process.env.BASE_URL,
  routes: [
    {
      path: '/',
      redirect:'/Index'
    },
    {
      path: '/index',
      component: () => import('./views/Index'),
      redirect:'/home',
      children:[
        {
          path: '/home',
          component: () => import('./views/Home'),
          redirect:'/cate',
          children:[
            {
              path: '/cate',
              component: () => import('./views/Cate'),
            },
            {
              path: '/cart',
              component: () => import('./views/Cart'),
            }
          ]
        },
        {
          path: '/list',
          component: () => import('./views/list'),
        }
      ]
    },
    {
      path: '/about',
      component: () => import('./views/About.vue'),
    },
  ]
})
